#include <algorithm>
#include <iostream>
#include <vector>
#include <functional>

using namespace std;

class Function_object {
public:
  int operator()(int a) { return 2 * a; }
};

int main() {

  vector<int> ver = {0, 2, 3, 6, 9};
  vector<int> v = {0, 0, 0, 0, 0};
  transform(ver.begin(), ver.end(), v.begin(), Function_object());
  for (auto &a : v) {
    cout << a << endl;
  }

  return 0;
}